<template>
	<view>
		<u-navbar title=" " leftIcon=" " placeholder :bgColor="bgColor" :border="false">
			<view class="left-wrap" slot="left" @click="show=true">
				<view class="lesson">
					<view class="lesson-name text-overfllow1">{{lessonName}}</view>
					<u-icon name="arrow-down" color="#000000" size="12" bold=""></u-icon>
				</view>
			</view>
			<view class="search-wrap" slot="center" @click="goSearch">
				<u-search placeholder="搜索" bgColor="#ffffff" :showAction="false" inputAlign="center" searchIcon=" "
					disabled></u-search>
			</view>
		</u-navbar>
		<view class="main">
			<view class="title">精选笔记</view>
			<view class="list">
				<view class="item shadow" v-for="i in 10" :key="i">
					<view class="top">
						<view class="note-name-line">
							<view class="note-name">笔记名称：计组第一章节</view>
							<view class="user">张佳</view>
						</view>
						<view class="note-id">ID:132456</view>
						<view class="note-profile">这是我的笔记这是我的笔记这是我的笔记这是我的笔记这是我的笔记这是我的笔记这是我的笔记这是我的笔记</view>
					</view>
					<view class="bottom">
						<view class="icon-btns">
							<view class="icon-btns-item">
								<u-icon name="heart" color="#3d3d3d" size="14"></u-icon>
								<view class="icon-name">点赞</view>
							</view>
							<view class="icon-btns-item">
								<u-icon name="star" color="#3d3d3d" size="14"></u-icon>
								<view class="icon-name">收藏</view>
							</view>
							<view class="icon-btns-item">
								<u-icon name="download" color="#3d3d3d" size="14"></u-icon>
								<view class="icon-name">下载</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
		<u-picker :show="show" :columns="columns" confirmColor="#ed7b54" @cancel="show=false"
			@confirm="onConfirmLesson"></u-picker>
		<custom-tab-bar :currentIndex="2"></custom-tab-bar>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgColor: 'transparent',
				show: false,
				lessonName: '专业课',
				columns: [
					['专业课1', '专业课专业课2', '专业课专业课专业课3', '专业课专业课专业课专业课专业课专业课4']
				]
			};
		},
		methods: {
			onConfirmLesson(e) {
				this.lessonName = e.value[0]
				this.show = false
			},
			goSearch() {}
		}
	}
</script>
<style>
	page {
		padding-bottom: 107px;
	}
</style>
<style lang="scss" scoped>
	.lesson {
		// width: 152rpx;
		height: 66rpx;
		border-radius: 10rpx;
		background: #FCFCFC;
		padding: 20rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 26rpx;

		.lesson-name {
			max-width: 100rpx;
			margin-right: 5rpx;
			color: #7F84A3;
		}
	}

	.search-wrap {
		width: 180px;
		height: 33px;
		border-radius: 20px;
		opacity: 1;
		background: #FCFCFC;
	}

	.main {
		.title {
			font-size: 42rpx;
			font-weight: 600;
			letter-spacing: 0.08em;
			color: #333333;
			margin: 48rpx 0 0 34rpx;
		}

		.list {
			margin-bottom: 40rpx;

			.item {
				margin: 28rpx 34rpx 0;
				color: #3d3d3d;
				border-radius: 30rpx;

				.top {

					border-radius: 30rpx 30rpx 0px 0px;
					opacity: 1;
					background: #F8F5F4;
					box-sizing: border-box;
					padding: 34rpx 34rpx 20rpx;

					.note-name-line {
						display: flex;
						align-items: center;
						justify-content: space-between;

						.note-name {
							font-size: 32rpx;
							font-weight: 600;
						}

						.user {
							font-size: 22rpx;
							font-size: 500;
						}
					}

					.note-id {
						margin-top: 10rpx;
						font-size: 16rpx;
					}

					.note-profile {
						margin-top: 12rpx;
						opacity: 1;
						font-size: 20rpx;
						font-weight: 500;
						line-height: 36rpx;
						letter-spacing: 0.08em;
					}
				}

				.bottom {
					height: 86rpx;
					display: flex;
					align-items: center;
					justify-content: flex-end;
					border-radius: 0 0 30rpx 30rpx;

					.icon-btns {
						height: 100%;
						display: flex;
						align-items: center;
						justify-content: center;

						.icon-btns-item {

							display: flex;
							flex-direction: column;
							align-items: center;
							justify-content: center;
							margin-right: 48rpx;



							.icon-name {
								color: #3d3d3d;
								font-size: 14rpx;
								margin-top: 8rpx;
								font-weight: 600;
							}
						}
					}
				}
			}
		}
	}
</style>